The present invention relates generally to communication systems, and specifically, to a method and apparatus for efficiently providing buffer resources within a communication device.
Asynchronous Transfer Mode (xe2x80x9cATMxe2x80x9d) networks are cell switching networks that transfer fixed length data units called xe2x80x9ccellsxe2x80x9d. Cells are transmitted from a source node to a destination node through ATM switches or digital switches, which are coupled together by way of communication lines. The ATM switches each includes a plurality of input ports coupled to input communication lines and a plurality of output ports coupled to outgoing communication lines.
Cells typically carry voice, video, and data from the source node to the destination node, and are fifty-three bytes in length including five bytes of header information and forty-eight bytes of payload. The header information includes a virtual path identifier (xe2x80x9cVPIxe2x80x9d) field and a virtual channel identifier (xe2x80x9cVCIxe2x80x9d) field. The VPI and VCI fields identify the next destination of a cell as it passes through a series of ATM switches on its way to its destination.
Each communication line can carry several different connections simultaneously. Queues or buffers are typically used for temporarily holding cells prior to transmission on a communication line. Additionally, more than one queue may be used to service different types of class of service connections. For example, cells belonging to higher priority connections (e.g., voice connections) are stored in queues that are marked as higher priority. On the other hand, cells belonging to lower priority connections (e.g., data) are stored in queues that are marked as lower priority.
Each ATM switch must be able to store or buffer cells for each connection. Consequently, in any ATM switch architecture, it is essential to efficiently use buffer resources, while remaining fair to all connections. Moreover, since the queues are finite in length, threshold values are set for each queue defining the maximum number of cells that can be stored for each connection. Thus, one function of an ATM switch is to determine whether to accept or reject cells depending on whether the queue that the cell belongs has reached its threshold.
One mechanism for providing efficient buffer resources is to over-allocate buffer space and scale the threshold values, i.e., cutting thresholds in one-half, one-fourth, etc. However, this does not provide sufficient granularity to maintain fairness on all connections, and imposes sudden severe punishment on misbehaving connections.
A method for performing threshold checking in a communication device is described. A cell that belongs to a first queue is detected, where the first queue includes a cell count and a maximum threshold cell count. A ratio is determined between the cell count and the maximum threshold cell count to select a scaling factor, responsive thereto. The method includes scaling the cell count by the scaling factor to provide a scaled cell count and comparing the scaled cell count with a maximum threshold cell count. The cell is discarded if the scaled cell count is greater than the maximum threshold cell count.
Other objects, features, and advantages of the present invention will be apparent from the accompanying drawings and from the detailed description that follows below.